package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.RotationRecords;
import com.zhijian.medical.entity.vo.request.RotationRecordsSearchVo;
import com.zhijian.medical.entity.vo.response.RotationRecordsVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RotationRecordsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(RotationRecords record);

    int insertSelective(RotationRecords record);

    RotationRecords selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(RotationRecords record);

    int updateByPrimaryKey(RotationRecords record);

    /**
     * 查询总数
     *
     * @param rotationRecordsSearchVo
     * @return
     */
    int count(RotationRecordsSearchVo rotationRecordsSearchVo);

    /**
     * 查询列表
     *
     * @param rotationRecordsSearchVo
     * @return
     */
    List<RotationRecordsVo> selectList(RotationRecordsSearchVo rotationRecordsSearchVo);

    /**
     * 查询单个
     *
     * @param rotationRecordsSearchVo
     * @return
     */
    RotationRecordsVo selectOne(RotationRecordsSearchVo rotationRecordsSearchVo);

    /**
     * 根据ID查询vo
     *
     * @param id
     * @return
     */
    RotationRecordsVo selectVoById(Long id);

    /**
     * 批量删除
     *
     * @param idList
     * @return
     */
    void deleteByIdList(@Param("idList") List<Long> idList);

    /**
     * 动态删除
     *
     * @param rotationRecordsSearchVo
     * @return
     */
    void deleteByCondition(RotationRecordsSearchVo rotationRecordsSearchVo);

    /**
     * 批量新增
     *
     * @param entities
     * @return
     */
    int insertBatch(@Param("entities") List<RotationRecords> entities);

    /**
     * 根据PersonId查询列表
     *
     * @param personId
     * @return
     */
    List<RotationRecordsVo> selectListByPersonId(Long personId);
}